package cn.iocoder.yudao.module.lowcode.controller.admin.script.vo;

import cn.idev.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - Groovy 脚本 Response VO")
@Data
public class GroovyScriptRespVO {

    @Schema(description = "脚本编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @ExcelProperty("脚本编号")
    private Long id;

    @Schema(description = "脚本名称/唯一标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "test_script")
    @ExcelProperty("脚本名称")
    private String scriptName;

    @Schema(description = "脚本显示名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试脚本")
    @ExcelProperty("脚本显示名称")
    private String displayName;

    @Schema(description = "脚本内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String scriptContent;

    @Schema(description = "脚本描述", example = "这是一个测试脚本")
    @ExcelProperty("脚本描述")
    private String description;

    @Schema(description = "脚本状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("脚本状态")
    private Integer status;

    @Schema(description = "脚本版本号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("脚本版本号")
    private Integer version;

    @Schema(description = "是否为当前激活版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @ExcelProperty("是否激活")
    private Boolean active;

    @Schema(description = "脚本分类/标签", example = "business")
    @ExcelProperty("脚本分类")
    private String category;

    @Schema(description = "执行次数统计", example = "100")
    @ExcelProperty("执行次数")
    private Long executeCount;

    @Schema(description = "最后执行时间")
    @ExcelProperty("最后执行时间")
    private LocalDateTime lastExecuteTime;

    @Schema(description = "排序", example = "1")
    @ExcelProperty("排序")
    private Integer sort;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("更新时间")
    private LocalDateTime updateTime;

}